
#import <appkit/appkit.h>
#import "Ellipse.h"

@implementation Ellipse:AShape

-drawShape
{
    float rx,ry,cx,cy;
    
    rx = bbox.size.width/2.0;
    ry = bbox.size.height/2.0;
    cx = bbox.origin.x+rx;
    cy = bbox.origin.y+ry;
    
    PSgsave();
	PSsetlinewidth(0.0);
	PStranslate(cx,cy);
	PSscale(rx,ry);
	PSnewpath();
	    PSarc(0.,0.,1.,0.,360.);
	PSclosepath();
	PSsetgray(shade);
	if(fill)
	    PSfill();
	else
	    PSstroke();
    PSgrestore();
    return self;
}


@end
